Goal: Find a psychology study that interests you and document a plan to adapt it into a web experiment.
Before coding anything, you need to find research that interests you and understand what makes experiments effective. Look for studies that seem particularly clever or insightful.
By the end of this step: You'll have found an interesting study to be transformed into a digital psych experiment.
To demonstrate the process, we chose the following study as our inspiration. Throughout this tutorial, we will build a web-based version of this experiment, and you will adapt each step to build your own.
Study Reference:
Mohammadi Sepahvand, N., StΓΆttinger, E., Danckert, J., & Anderson, B. (2014). Sequential decisions: A computational comparison of observational and reinforcement accounts. PLoS ONE, 9(4), e94308.
Research Question:
How do humans build and update mental models to make sequential decisions under uncertainty? Specifically, when playing against an opponent whose strategy changes over time, do people use statistical learning (trying to predict what the opponent will do next) or reinforcement learning (learning which actions tend to lead to wins)? The study tested this by having participants play Rock-Paper-Scissors against a computer that shifted from random play to increasingly biased strategies, then used computational modeling to determine which learning approach best explained human behavior.
Our Adaptation:
Build a web-based Rock-Paper-Scissors game where participants play against AI opponents with different strategic approaches. We implement the original study's biased algorithms (random play, lightly biased toward rock at 50%, heavily biased toward paper at 80%) plus engaging AI opponents including pattern matchers, frequency counters, and adaptive learners. We track participant choices, reaction times, win rates, learning curves, and strategy adaptation patterns. The experiment measures whether participants detect different AI strategy types and adapt their play accordingly, while collecting rich behavioral data suitable for post-hoc analysis using the original study's computational models (RELPH and ELPH) to understand individual differences in learning strategies.
The goal is simple: find an article about a psychology experiment that interests you and that you want to recreate. Here are some approaches to help you get there:
Browse psychology research directly:
Use this prompt with Claude, ChatGPT, or Gemini:
I want to find interesting psychology experiments that could inspire a digital study.
Please suggest 5 psychology experiments that:
For each suggestion, explain:
Focus on experiments that are interesting or reveal something surprising about cognition.
Find classic studies to replicate or extend:
Once you've selected a study, create a markdown file in your repository with the study's key details. This should include the abstract, main findings, methodology, and your notes about why it interests you. See our sequential-decisions.md file as an example of the level of detail to capture.
As you review potential studies, ask yourself:
Once you find a study that interests you, capture the key details:
For this tutorial, we will focus on building experiments that run in any modern web browser. This approach is accessible, easy to share, and can be hosted for free.
β Experiments run in any browser, are easy to share, and can be hosted for free on GitHub Pages. This is the path we will follow.
A powerful environment for creating reproducible research documents that combine code, analysis, and text. (Tutorial for this option coming soon).